<!DOCTYPE html>
<html>
<head>
<title>预约看房</title>
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
<meta name="keywords" content="keyword1,keyword2,keyword3">
<meta name="description" content="this is my page">
<meta name="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
</head>
<link rel="stylesheet" href="./css/sm.min.css">
<link rel="stylesheet" href="./css/sm-extend.min.css">
<link rel="stylesheet" href="../jsp/css/yuyueKanfang.css">
<script src="../js/jquery-2.1.1.js"></script>
<script src="./js/zepto.js" type="text/javascript"></script>
<script src="./js/sm.js" type="text/javascript"></script>
<script src="./js/sm-extend.js" type="text/javascript"></script>
<script src="../js/ICalendar/js/lCalendar.js"></script>
<script src="../jsp/js/yuyueKanfang.js"></script>
<script src="../js/common.js"></script>
<script src="../jsp/js/picker.js"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>
<script src="js/pointlog.js"></script>
<script type="text/javascript">
	window.$$=window.Zepto = Zepto;
    /*获取到Url里面的参数*/
    var houseId = $.getUrlParam('houseId');
    var nonce="";//生成签名的随机串
    var signature="";//签名
    var timestamp="";//时间戳
    var title="欢迎使用蓝居";
    var desc="这是蓝居管家首页，欢迎使用";
    var sharLink="http://nvstop.cn/LanJuPublic/lanju/home.jsp";
    var imgUrl="http://nvstop.cn/LanJuPublic/images/lanju.jpg";
    var basePath="<%=basePath%>";
    $(document).ready(function(){  
  	  var url = encodeURI(location.href.split('#')[0]);
  	  $.ajax({
  	         url: "../weixinImpl/getEncryptJsapiTicket.spring?rn="+(new Date().getTime()),
  	         type: "POST",
  	         data:{"url":url},
  	         dataType: "json",
  	         success: function(data){
  	        	 if(data != null){
  	        		 nonce=data.nonce;
  		             signature=data.signature;
  		             timestamp=data.timestamp;
  		             loadWx();
  	        	 }
  	             
  	          },
  	          error:function(err){
  	            console.log('异常');
  	          }
  	        });
  });
    
    function loadWx(){
  	  wx.config({
  		    debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
  		    appId: 'wxb3b7beee9190b2ef', // 必填，公众号的唯一标识wxd894029b9bdb4b67
  		    timestamp: timestamp, // 必填，生成签名的时间戳
  		    nonceStr: nonce, // 必填，生成签名的随机串
  		    signature: signature,// 必填，签名
  		    jsApiList: ['onMenuShareTimeline','onMenuShareAppMessage','onMenuShareQQ'] // 必填，需要使用的JS接口列表
  		});
  	  wx.ready(function(){
  		  //分享到朋友圈
  		  wx.onMenuShareTimeline({
  			    title: title, // 分享标题
  			    link: sharLink, // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
  			    imgUrl: imgUrl, // 分享图标
  			    desc: desc, // 分享描述
  			    success: function () {
  			    // 用户确认分享后执行的回调函数
  				},
  			cancel: function () {
  			    // 用户取消分享后执行的回调函数
  		    }
  		});
  		  //分享到朋友
  		  wx.onMenuShareAppMessage({
  			  title: title, // 分享标题
  			  desc: desc, // 分享描述
  			  link: sharLink, // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
  			  imgUrl: imgUrl, // 分享图标
  			  type: 'link', // 分享类型,music、video或link，不填默认为link
  			  dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
  			  success: function () {
  			  // 用户确认分享后执行的回调函数
  			  },
  			  cancel: function () {
  			  // 用户取消分享后执行的回调函数
  			  }
  			  });
  		  //分享到QQ
  		  wx.onMenuShareQQ({
  			  title: title, // 分享标题
  			  desc: desc, // 分享描述
  			  link: sharLink, // 分享链接
  			  imgUrl: imgUrl, // 分享图标
  			  success: function () {
  			  // 用户确认分享后执行的回调函数
  			  },
  			  cancel: function () {
  			  // 用户取消分享后执行的回调函数
  			  }
  			  });
  	  });
  	  
  	  wx.error(function(res){
  		
  	  });
  	  
  }
    
    
$(function() {
	//初始化房子信息
	if(!houseId){
		$$.alert("获取房子信息失败，请联系管理员", function(){
			history.go(-1);	
		});
	}else{
		yuyue.loadHouseById(houseId);
	}

});
var args=ponitLog.getWindowsParam();

</script>
<body>
<header class="bar bar-nav">
	    <a class="button button-link button-nav pull-left" href="javaScript:history.go(-1)" data-transition='slide-out'>
	      <span class="icon icon-left"></span>
	      返回
	    </a>
	    <h1 class="title">业主服务</h1>
	  </header>
	<div class="house_note" style="margin-top: 45px;">
		<div class="house_text">
			<img id="houseImg" alt="" src="../images/house_temp.jpg"
				style="width: 90px; height: 75px; margin: 13px; float: left;">
			<ul id="houseInfoUl" style="margin-top: 18px;">
				<li><span id="houseName">蓝居整租：珠江花园2期</span></li>
				<li id="price">3360元/月</li>
				<li id="floor">100平方| 5/17层</li>
			</ul>
		</div>
	</div>
	<div style="margin-top: 10px;">
		<span class="contact">联系人信息</span>
	</div>
	<div class="content" style="margin-top: 110px;">
		<div class="list-block">
			<ul>
				<li>
					<div class="item-content">
						<div class="item-media">
							<i class="icon icon-form-name"></i>
						</div>
						<div class="item-inner">
							<div class="item-title label">姓名</div>
							<div class="item-input">
								<input type="text" placeholder="请输入你的 姓名" id="nickName">
							</div>
						</div>
					</div>
				</li>
				<li>
					<div class="item-content">
						<div class="item-media">
							<i class="icon icon-form-gender"></i>
						</div>
						<div class="item-inner">
							<div class="item-title label">性别</div>
							<div class="item-input">
								<select id="sex">
									<option value="0">男</option>
									<option value="1">女</option>
								</select>
							</div>
						</div>
					</div>
				</li>
				<li>
					<div class="item-content">
						<div class="item-media">
							<i class="icon icon-form-name"></i>
						</div>
						<div class="item-inner">
							<div class="item-title label">手机号码</div>
							<div class="item-input">
								<input type="text" id="phone" placeholder="请输入手机号"
									maxlength="11">
							</div>
						</div>
					</div>
				</li>
				<li>
					<div class="item-content">
						<div class="item-media">
							<i class="icon icon-form-calendar"></i>
						</div>
						<div class="item-inner">
							<div class="item-title label">看房时间</div>
							<div class="item-input">
								<input type="date" placeholder="点击选择预约时间" value=""
									id='appointmentTime' />

							</div>
						</div>
					</div>
				</li>
				<li class="align-top">
					<div class="item-content">
						<div class="item-media">
							<i class="icon icon-form-comment"></i>
						</div>
						<div class="item-inner">
							<div class="item-title label">备注</div>
							<div class="item-input">
								<textarea id="userRemark" placeholder="写点什么..."></textarea>
							</div>
						</div>
					</div>
				</li>
			</ul>
		</div>
		<div class="content-block">
			<div class="row">
				<div class="col-50">
					<a href="javascript:history.go(-1);"
						class="button button-big button-fill button-light">取消</a>
				</div>
				<div class="col-50">
					<a href="javaScript:yuyue.saveAppointment()"
						class="button button-big button-fill button-info">提交</a>
				</div>
			</div>
		</div>
	</div>
</body>
</html>
